layui.define(['admin', 'form'], function (exports) {
    var $ = layui.$, admin = layui.admin, form = layui.form;

    //提交编辑
    form.on('submit(edit)', function (data) {
        admin.req({
            url: '/shengteng/Shop/sale'
            , type: 'post'
            , data: data.field
            , done: function (res) {
                layer.msg(res.msg, {icon: 1, time: 1000}, function () {
                    // layer.closeAll("iframe");
                    //刷新父页面
                    // parent.location.reload();
                    location.reload()
                });
            }
        });
    });

    exports('sale', {});
});
